<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>多维数组解构赋值</title>
</head>

<body>
  <script>
    // ============================== 多维数组解构赋值 ==============================


    // 常规写法
    // const  [a,b]= ['小米', ['华为', '苹果']]
    // const [c,d] = b
    // console.log(a,c,d)  //小米 华为 苹果


    //简便写法
    const  [a,[b,c]]= ['小米', ['华为', '苹果']]
    console.log(a,b,c) //小米 华为 苹果
    

    
    
  </script>
</body>

</html>